//
//  ViewController.m
//  Wi-Fi Party remade-1
//
//  Created by Vieta Ken on 2021/2/26.
//

#import "ViewController.h"
@interface ViewController ()
@property (weak, nonatomic) IBOutlet UITableView *fileTableView;

@end

@implementation ViewController
- (IBAction)switchToggled:(id)sender {
    UISwitch *swt=sender;
    if(swt.on)  [self->room speak];
    else        [self->room unspeak];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [UIApplication sharedApplication].idleTimerDisabled=YES;
    self->room=[[Room alloc] init];
    
    self->tableview_datasource=[[FileTableDataSource alloc] init];
    self->tableview_deletage=[[FileTableDelegate alloc] init];
    self.fileTableView.delegate=self->tableview_deletage;
    self->tableview_deletage->room=self->room;
    self.fileTableView.dataSource=self->tableview_datasource;
}


@end
